//Set form fileds with value loaded from local storage
function init(){
	//load saved options
	if(localStorage["location"]){
		$("#location").attr("value" , localStorage["location"]);
		$("#period").attr("value" , localStorage["period"]);
	}
	
	
}

//save options to local storage
function saveOptions(){
	//save options
	localStorage["location"] = $("#location").attr("value");
	localStorage["period"] = $("#period").attr("value");
	
	 // Update status to let user know options were saved.
	$("#status").attr("innerHTML" , "Options Saved");
	  setTimeout(function() {
		  $("#status").attr("innerHTML" , "");
	  }, 1000);
}